package com.amoyt.project.mapper;

import com.amoyt.project.domain.dto.query.PersonPageQuery;
import com.amoyt.project.domain.pojo.PovertyPerson;
import com.amoyt.project.domain.vo.PovertyPersonVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 贫困个人信息表（记录致贫核心人员） Mapper 接口
 * </p>
 *
 * @author AmoyT
 * @since 2025-08-21
 */
@Mapper
public interface PovertyPersonMapper extends BaseMapper<PovertyPerson> {


    /**
     * 批量插入数据
     * @param personList
     */
    void insertBatchList(List<PovertyPerson> personList);

    /**
     * 查询贫困人员列表和贫困户信息
     * @param page
     * @param query
     * @return
     */
    IPage<PovertyPersonVo> queryPersonListAndHousehold(@Param("page") Page<PovertyPersonVo> page, @Param("query") PersonPageQuery query);
}
